package edu.pku.sei.transformation.mtparser;

import lpg.runtime.*;

/**
 *<b>
 *<li>Rule 30:  NotExpr ::= not BooleanExpr
 *</b>
 */
public class NotExpr extends Ast implements INotExpr
{
    private IBooleanExpr _BooleanExpr;

    public IBooleanExpr getBooleanExpr() { return _BooleanExpr; }

    public NotExpr(IToken leftIToken, IToken rightIToken,
                   IBooleanExpr _BooleanExpr)
    {
        super(leftIToken, rightIToken);

        this._BooleanExpr = _BooleanExpr;
        initialize();
    }

    public boolean equals(Object o)
    {
        if (o == this) return true;
        if (! (o instanceof NotExpr)) return false;
        if (! super.equals(o)) return false;
        NotExpr other = (NotExpr) o;
        if (! _BooleanExpr.equals(other._BooleanExpr)) return false;
        return true;
    }

    public int hashCode()
    {
        int hash = super.hashCode();
        hash = hash * 31 + (_BooleanExpr.hashCode());
        return hash;
    }

    public void accept(Visitor v) { v.visit(this); }
    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
    public Object accept(ResultVisitor v) { return v.visit(this); }
    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
}


